<template>
  <van-sticky>
    <van-nav-bar :title="titleway" left-arrow @click-left="onClickLeft">
      <div slot="right">
        <ul class="serch-ul">
          <li @click="hrefs('priceQs')">
            <img src="../../assets/img/price/iconqs.png" alt />
            <span>走势图</span>
          </li>
          <li @click="hrefs('priceSj',1)">
            <img class="img1" src="../../assets/img/price/iconsj.png" alt />
            <span>数据</span>
          </li>
        </ul>
      </div>
    </van-nav-bar>
  </van-sticky>
</template>

<script>
import share from "./share.png";
export default {
  props: ["priceObj"],
  data() {
    return {
      tardeNum: 0
    };
  },
  computed: {
    titleway() {
      return this.$route.meta.title || this.$route.query.menuname;
    }
  },
  methods: {
    hrefs(i, t) {
      // if (t == 1) {
      //   this.$toast("敬请期待！");
      //   return false;
      // }
      this.$router.push({ path: i, query: this.priceObj });
    },
    onClickLeft() {
      this.$router.go(-1);
    }
  }
};
</script>

<style scoped lang="less">
.van-nav-bar {
  background: #183a60;
  color: #ffffff;
  height: 50px;
  line-height: 50px;
  .van-icon {
    color: #ffffff;
    font-size: 20px;
  }
  .van-nav-bar__title {
    color: #ffffff;
    max-width: 40%;
  }
}
.serch-ul {
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  line-height: 1;
  li {
    height: 100%;
    width: 40px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    font-size: 10px;
    color: #ffffff;
    transform: scale(0.8);
    &:first-child {
      margin-right: 4px;
    }
    img {
      width: 20px;
      height: 19px;
      margin-bottom: 5px;
    }
    .img1 {
      width: 17px;
    }
  }
}
</style>
